package net.yihang;

import java.util.ArrayList;
import java.util.List;

public class TestSub {
    public static void main(String[] args) {
        ArrayList images = new ArrayList();
        images.add(1);images.add(2);images.add(3);images.add(4);images.add(5);images.add(6);images.add(7);
        int cores = 10;
        int n = images.size()/cores;
        for (int i = 0; i < cores; i++) {
            List list;
            System.out.println((i+1)*n);
            if(i==cores-1) {
                list = images.subList(i * n, images.size());
            } else {
                list = images.subList(i * n, (i+1) * n);
            }

            System.out.println(list);
        }
    }
}
